Mega Code Archive

Categories
1) Android
2) ASP.Net
3) ASP.Net Tutorial
4) C
5) C Tutorial
6) C#
7) C# Book
8) C# by API
9) C# Tutorial
10) C++
11) C++ Tutorial
12) Delphi
13) Flash ActionScript
14) Flex
15) Java
16) Java Book
17) Java by API
18) Java Tutorial
19) JavaScript DHTML
20) JavaScript Reference
21) JavaScript Tutorial
22) MSOfficeExcel 2007 Tutorial
23) MSOfficePowerPoint 2007 Tutorial
24) MSOfficeWord 2007 Tutorial
25) MSSQL
26) MSSQL Tutorial
27) MySQL
28) MySQL Tutorial
29) Oracle PLSQL
30) Oracle PLSQL Tutorial
31) Perl
32) Php
33) PostgreSQL
34) Python
35) Python Tutorial
36) Ruby
37) Silverlight
38) VB.Net
39) VB.Net by API
40) VB.Net Tutorial
41) Visual C++ .NET
42) VisualBasic Script
43) XML
44) XML Tutorial
 
Ruby
1) Active Record
2) Array
3) CGI
4) Class
5) Collections
6) Database
7) Date
8) Design Patterns
9) Development
10) File Directory
11) GUI
12) Hash
13) Language Basics
14) Method
15) Network
16) Number
17) Rails
18) Range
19) Reflection
20) Statement
21) String
22) Threads
23) Time
24) Tk
25) Unit Test
26) Windows Platform
27) XML
Language Basics
1) %d for decimal integers
2) A commonly used shortcut uses arrays to quickly load a collection of libraries at once
3) A few of Rubys assignment operators
4) A Full List of Number Comparison Operators in Ruby
5) A Simple Ruby Program
6) Abbreviated Assignment Operators
7) Abstract method in a module
8) Access methods inside classes inside modules with Ruby scope resolution operator (
9) Add extra # sign to interpolation
10) Alter the execution order using parentheses
11) And, or and Not
12) Are more than two statements OK
13) Array constant
14) Array elements automatically assigned to variables
15) Array on righthand side for multiple args
16) Assign constant array value to three variables
17) Assign nil to array element
18) Assign values of different kinds, such as a string, float, and integer
19) Assign values to more than one variable in one statement
20) Automatically Initializing Mixed-In Modules
21) Avoid typing ruby each time on UnixLinux systems by adding a shebang line (#!) at the top of your Ruby file
22) Avoiding Naming Collisions with Namespaces
23) Be careful when you use the div method
24) Bitwise and
25) Bitwise exclusive or
26) Bitwise not or complement
27) Bitwise or
28) Booleans
29) Call integer to_s and Interpolation
30) Chain statements together
31) Chaining together multiple comparisons is also possible with a clever use of parentheses
32) Change the value of Pi, itll let you do it, but youll get a warning
33) Check the version of Interactive Ruby
34) Check whether one or the other is true by using
35) Classes and modules begin with an upper case letter
36) Compact an array
37) Comparable module uses the = operator on the class that includes it
38) Compare string after interpolation
39) Comparing Floating-Point Numbers
40) Comparison Operators and Expressions
41) Consider an alternative of Ternary Operator
42) Constant Interpolation
43) Constants are defined within the scope of the current class and are made available to all child classes, unless theyre ove
44) Constants in Ruby start with an uppercase letter
45) Create a basic Ruby script called debugtest rb
46) Create a variable and compare it with a number
47) Create comments in Ruby, using the # symbol
48) Creating Mixins
49) Creating Modules
50) Define a variable to hold an integer
51) Define global variables by putting a dollar sign ($) in front of the variable name
52) Display a Message
53) Division and Truncation
54) Do a calculation in interpolation block
55) Do bitwise operations in Ruby
56) Documentation for the initialize method
57) Doing a calculation
58) Enter your Ruby code at that prompt, such as puts Hello from Ruby
59) Equality, Less Than, or Greater Than
60) Escape theinterpolation string
61) Everything Is an Object
62) Exchange three value with using new variables
63) Exchange value with an extra variable
64) Exchanging Values Without Using Temporary Variables
65) Explicitly extend a statement onto the next line with a backslash
66) Exponential with uppercase E
67) Field and precision combined
68) Field width
69) Float number Precision
70) For information on a class method, type at a command line
71) For more information on an instance method, type something like
72) For more information on Hash, type this at a command line
73) Force exponential notation
74) Format a string with puts
75) Format based string interpolation
76) Freeze does nothing since Fixnums are already immutable
77) Full-length floating-point numbers
78) Gem help env
79) Get acquainted with math operations in Ruby
80) Get help on what commands are available (some output truncated)
81) Get the command line parameter
82) Getting help on how to issue RubyGems commands
83) Give a value a name by assigning it to a variable
84) Global Constants list
85) Global Variables
86) Group multiple expressions into a single expression
87) Have more than two statements separated by &&
88) Have two local variables with the same name but in different scopes
89) Help on examples (some output truncated)
90) Hexadecimal integers
91) create a module and then include it in a class
92) Id2name
93) If a method name ends in an equals sign (=), as in family_name=
94) If a method name ends in an exclamation point (!), as in delete!
95) If a method name ends with a question mark (), as in eql, then the method returns a Boolean
96) If x is non-nil
97) Initializing Instance Variables Defined by a Module
98) Insert some output from a shell command
99) Interpolating Variables in Double-Quoted Strings
100) Interpolation
101) Interpolation in Here document
102) Interpolation with two variables
103) Involve demonstrating two classes with the same name, but in different modules
104) Is it a nil value
105) Items declared in those methods are restricted to those methods
106) Lets check to see if Ruby on Rails is present with the list command
107) List in RDoc
108) Local Variables versus Methods
109) Make sure trailing comments are far enough from the code
110) Math calculation
111) Methods such as div, modulo, divmod, quo, and remainder
112) Mixing in Class Methods rb
113) Modules and Namespaces
114) Modules provide a structure to collect Ruby classes, methods, and constants into a single, separately named and defined un
115) Multiple arguments to be formatted
116) Nested Inclusions
117) Note Ruby does not have ++
118) Number value Interpolation
119) Object_id of three string with the same value
120) Object_id of three symbols with the same name
121) Objects Might Have Their Own Methods
122) Octal integers string format
123) Operator is or
124) Operator Precedence Demo
125) Operators are actually implemented as method calls
126) Predefined Variables list
127) Prefix and variable type
128) Prefixed with the module name you can call the method from anywhere, as is the case with the Math module
129) Print all classes (excluding exceptions)
130) Print all exceptions
131) Print all modules (excluding classes)
132) Processing Files with RDoc
133) Put class into interpolation block
134) Put this code in a file called string_extensions rb
135) Put two or more variables together with the + method
136) Putc Statement outputs one character at a time
137) Rake [-f rakefile] {options} targets
138) Rake is a build tool
139) RDoc Basics
140) RDoc options are used like this
141) Read the document by package
142) Reference an undefined variable in a method
143) Require the file containing the module, and then it would work (again, require is expecting a name in the load path)
144) Return boolean value from method
145) Ruby allows you to change the values in constants by assigning a new value to them
146) Ruby Interpreter option list
147) Ruby is case-sensitive
148) Ruby Operators
149) Ruby uses tons of symbols internally To prove it, execute this line of Ruby code
150) RubyGems is a package utility for Ruby
151) Rubys reserved words
152) Running the Ruby Interpreter
153) See if it is nil
154) Show everything on the RubyGems environment with this command
155) Show the RubyGems installation directory
156) Simple Arithmetic
157) Simulating Multiple Inheritance with Mixins rb
158) Single-character output
159) Six significant digits
160) Some of the operators have assignment shortcuts
161) Some valid examples of commenting in Ruby
162) Store classes inside modules
163) Storing Data in Variables
164) String output to STDOUT
165) Swap the value of two variables
166) Symbol in an array
167) Symbols is placeholders for identifiers and strings
168) Test load command
169) Test require command
170) The #{100 5} interpolates the result of 100 5 (500) into the string at that position
171) The && operator means and
172) The == and eql return true or false
173) The Making of a Man
174) The Scope of Constants
175) The Ternary Operator
176) The ternary operator can be used to build expressions on a single line
177) This block comment conceals several lines from the interpreter with =begin=end
178) To select dependencies as you install a package, skip the --include-dependencies option
179) To uninstall a package with the uninstall command
180) To update all the gems on your system with all the current versions, use the update command
181) Type a command to check the version of Ruby (this works on UnixLinux and Windows)
182) Unary operators, + and -, which indicate negative and positive numbers
183) Understand the difference between numbers and digits
184) Uppercase hexadecimal integers
185) Use %f or %e depending on magnitude
186) Use load to load external source code files into your program
187) Use or in if statement
188) Use Parallel Assignment
189) Use parentheses
190) Use remove_const to delete a constant definition
191) Use string method in interpolation
192) Use the keyword and instead of &&
193) Use the ri tool
194) Using a Shebang Line on UnixLinux
195) Using expression substitution
196) Using Math Operators
197) Using only local variables
198) Using Symbols as Hash Keys
199) Using the Ternary Operator
200) Variables allow you to write and use programs that work upon varying data
201) Variables can also be assigned the results of an expression
202) Variables can point to any kind of object
203) Variables in a Class
204) What are Comments
205) Working with Ruby Interactively, start irb
206) X, y = 1, 2 # Same as x = 1; y = 2
207) You can check what dependencies a gem has with the dependency command
208) You can interpolate strings too
209) You dont need any end-of-line marker at all in Ruby
210) You press the Enter key, irb evaluates your Ruby and gives you the result